<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <%@ include file="/common/plateform/include/common-base.jsp" %>
    <link href="${ctx}/common/plateform/plugins/bootstrap-chinese-region/bootstrap-chinese-region.css" rel="stylesheet">
    <script src="${ctx}/common/plateform/plugins/bootstrap-chinese-region/bootstrap-chinese-region.js"></script>
    <script src="${ctx}/common/plateform/plugins/bootstrap-chinese-region/main.js"></script>
    <title>地区测试</title>
</head>

<!-- Part 一、 以下是body主体内容的模块区域 -->
<body class="hold-transition ${sysColor} sidebar-mini">
<div class="wrapper">

    <!-- top start -->
    <%@include file="/common/labf/top.jsp" %>
    <!-- top end -->
    <!-- left start -->
    <%@include file="/common/labf/left.jsp" %>
    <!-- left end-->

    <div class="content-wrapper">
        <!-- Main start -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">

                    <!------搜索  start ------->
                    <div class="box box-info">
                        <!--搜索title  start -->
                        <div class="box-header with-border">
                            <h3 class="box-title"><i class="fa fa-search"></i> demo</h3>
                            <div class="box-tools pull-right">
                                <button type="button" class="btn btn-box-tool" data-widget="collapse">
                                    <i class="fa fa-minus"></i>
                                </button>
                            </div>
                        </div>
                        <!--搜索title  end -->
                        <div class="box-body">
                            <form id="searchForm" action="javascript:;">
                                <table class="table table-bordered bordercolor" data-sort="sortDisabled">
                                    <tbody>
                                    <tr>
                                        <td class="active" align="right"><label
                                                class="form-control-static">所属地区：</label></td>
                                        <td>
                                            <div class="bs-chinese-region flat dropdown" data-submit-type="id" data-min-level="1" data-max-level="3">
                                                <input type="text" class="form-control clean" data-area-text="true" name="addressText" placeholder="请选择你的地区" data-toggle="dropdown" readonly="" value="">
                                                <input type="hidden" class="form-control clean" data-area-id="true" name="addressCode">
                                                <div class="dropdown-menu">
                                                    <div>
                                                        <ul class="nav nav-tabs" role="tablist">
                                                            <li role="presentation" class="active"><a href="#bcr_province_1" data-next="bcr_city_1" role="tab" data-toggle="tab">省份</a></li>
                                                            <li role="presentation"><a href="#bcr_city_1" data-next="bcr_district_1" role="tab" data-toggle="tab">城市</a></li>
                                                            <li role="presentation"><a href="#bcr_district_1" data-next="street" role="tab" data-toggle="tab">区县</a></li>
                                                        </ul>
                                                        <div class="tab-content">
                                                            <div role="tabpanel" class="tab-pane active" id="bcr_province_1">请选择</div>
                                                            <div role="tabpanel" class="tab-pane" id="bcr_city_1">请先选择省份</div>
                                                            <div role="tabpanel" class="tab-pane" id="bcr_district_1">请先选择省份和城市</div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </td>
                                        <td class="active" align="right"><label
                                                class="form-control-static">测试：</label></td>
                                        <td>
                                            <button type="button" class="btn btn-success" onclick="getDataTest();"
                                                    data-temp-event="searchForm_hidden"><i class="fa fa-search"></i> 查询
                                            </button>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </form>
                        </div>
                    </div>
                    <!------- 搜索 end -------->

                </div>
            </div>




            <!-- Part 三、 以下是js模块区域 -->
            <script>
                var clickMenu = "test-demo";


                $(function () {
                    mytools.cleanData("#searchForm");
                    regionTools.initAreaData(".bs-chinese-region","");
                });

                function getDataTest() {
                    var addressText = $("#searchForm").find("input[name='addressText']").val();
                    var addressCode = $("#searchForm").find("input[name='addressCode']").val();
                    alert(addressText+"\n"+addressCode);
                }

            </script>
        </section>
        <!-- Main end -->
    </div>
    <!-- foot start -->
    <%@include file="/common/labf/foot.jsp" %>
    <!-- foot start -->
</div>
<!-- /.content-wrapper -->
</body>
</html>




























